﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<AddressBook.Business.Person.Contact>" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
	Edit
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
	<% using (Html.BeginForm())
		{%>
	<%: Html.ValidationSummary(true) %>
	<fieldset id="EditContact">
		<div class="titlebar">
			<h2>
				Edit Contact
			</h2>
			<div class="floatright">
				<input type="image" src='<%: Url.Content("~/Content/Images/save_16.png") %>' value="submit" alt="Save Contact" />
				<a href='<%: Url.Action("Index", "Home") %>'>
					<img src='<%: Url.Content("~/Content/Images/close_16.png") %>' alt="Close" style="margin-left: 5px;" />
				</a>
			</div>
		</div>
		<div id="contact_leftcolumn">
			<div class="subfieldset">
				<div class="subtitlebar">
					<h3>Contact Details</h3>
				</div>
				<table cellpadding="0" cellspacing="0" border="0">
					<tr>
						<td class="editor-label">
							<%: Html.LabelFor(model => model.Title) %>
						</td>
						<td class="editor-field">
							<%: Html.TextBoxFor(model => model.Title) %>
							<%: Html.ValidationMessageFor(model => model.Title) %>
						</td>
					</tr>
					<tr>
						<td class="editor-label">
							<%: Html.LabelFor(model => model.FirstName) %>
						</td>
						<td class="editor-field">
							<%: Html.TextBoxFor(model => model.FirstName) %>
							<%: Html.ValidationMessageFor(model => model.FirstName) %>
						</td>
					</tr>
					<tr>
						<td class="editor-label">
							<%: Html.LabelFor(model => model.MiddleName) %>
						</td>
						<td class="editor-field">
							<%: Html.TextBoxFor(model => model.MiddleName) %>
							<%: Html.ValidationMessageFor(model => model.MiddleName) %>
						</td>
					</tr>
					<tr>
						<td class="editor-label">
							<%: Html.LabelFor(model => model.LastName) %>
						</td>
						<td class="editor-field">
							<%: Html.TextBoxFor(model => model.LastName) %>
							<%: Html.ValidationMessageFor(model => model.LastName) %>
						</td>
					</tr>
					<tr>
						<td class="editor-label">
							<%: Html.LabelFor(model => model.Suffix) %>
						</td>
						<td class="editor-field">
							<%: Html.TextBoxFor(model => model.Suffix) %>
							<%: Html.ValidationMessageFor(model => model.Suffix) %>
						</td>
					</tr>
				</table>
			</div>
		</div>
		<div id="contact_rightcolumn">
			<div class="subfieldset">
				<div class="subtitlebar">
					<h3>Addresses</h3>
				</div>
				<%: Html.ListBox("Addresses", new SelectList(Model.Addresses, "AddressId", "FullAddress"))%>
			</div>
			<div class="subfieldset">
				<div class="subtitlebar">
					<h3>Phone Numbers</h3>
				</div>
				<%: Html.ListBox("PhoneNumbers", new SelectList(Model.PhoneNumbers, "PhoneNumberId", "DisplayPhoneNumber"))%>
			</div>
			<div class="subfieldset">
				<div class="subtitlebar">
					<h3>Email Addresses</h3>
				</div>
				<%: Html.ListBox("EmailAddresses", new SelectList(Model.EmailAddresses, "EmailAddressId", "EmailAddress"))%>
			</div>
		</div>
	</fieldset>
	<% } %>
</asp:Content>
